<!DOCTYPE html>
<html>
<meta charset="utf-8">
<link rel="stylesheet" href="/css/bootstrap-datetimepicker.min.css" />
<head th:include="include :: header"></head>
<link href="/js/plugins/layui/css/layui.css" rel="stylesheet">
<style>
.wizard-big.wizard > .content {
    height: 750px;
    overflow:auto;
}
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
	<div class="row">
        <div class="col-sm-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>代理商实名</h5>
                </div>
                <div class="ibox-content">

                    <form id="agentForm" class="wizard-big">
                    	<input id="agentId" name="agentId" th:value="${agent.agentId}" class="form-control" type="hidden">
                        <fieldset>
                            <div class="row" style="margin-bottom: 18px;">
                            	<div class="col-sm-12">
	                            	<legend>实名信息</legend>
	                            </div>
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label>省份 *</label>
                                        <select id="provinceCode" name="provinceCode" class="form-control required" required="required">
											<option value="">请选择</option>
											<option th:each="pro:${provinces}" th:value="${pro.id}" th:text="${pro.name}" th:selected="${pro.id eq agent.provinceCode}"></option>
										</select>
										<input type="hidden" name="province" id="province" th:value="${agent.province}"/>
                                    </div>
                                    <div class="form-group">
                                        <label>法人姓名 *</label>
                                        <input id="legalerName" name="legalerName" class="form-control required" type="text" required="required" th:value="${agent.legalerName}">
                                    </div>
                                    <div class="form-group">
                                        <label>法人证件号码 *</label>
                                        <input id="legalerCardNumber" name="legalerCardNumber" class="form-control required" type="text" required="required" th:value="${agent.legalerCardNumber}">
                                    </div>
                                    <div class="form-group">
                                        <label>证件正面 *</label>
				                        <div>
	                                        <div class="layui-upload-drag" id="img_front" style="width: 70%;height: 200px;" >
	                                        	<img alt="" th:src="${agent.legalerCardPicFront}" id="img_f" width="100%" height="100%"/>
	                                        	<p>点击上传，或将文件拖拽到此处</p>
	                                        </div>
	                                        <input type="hidden" name="legalerCardPicFront" id="legalerCardPicFront" th:value="${agent.legalerCardPicFront}"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label>城市 *</label>
                                        <select id="cityCode" name="cityCode" class="form-control required" required="required">
						 				</select>
						 				<input type="hidden" name="city" id="city" th:value="${agent.city}"/>
                                    </div>
                                    <div class="form-group">
                                        <label>法人证件类型 *</label>
                                        <select id="legalerCardType" name="legalerCardType" class="form-control required" required="required">
											<option th:each="pro:${certTypes}" th:value="${pro.key}" th:text="${pro.value}"></option>
										</select>
                                    </div>
                                    <div class="form-group">
                                        <label>法人证件有效时间 *</label>
                                        <div>
	                                        <input id="beginDateL" name="beginDateL" type="text"  class="form-control form_datetime required" required="required" th:value="${cardEffectiveTime1}" style="width:40%;float: left" placeholder="开始时间"  data-date-format="yyyy-MM-dd" data-link-format="yyyy-MM-dd" readonly="readonly">
											<span style="vertical-align:top;padding: 8px;float: left">-</span>
											<input id="endDateL" name="endDateL" type="text"  class="form-control form_datetime required" required="required" th:value="${cardEffectiveTime2}" style="width:40%;" placeholder="结束时间"  data-date-format="yyyy-MM-dd" data-link-format="yyyy-MM-dd" readonly="readonly">
											<input id="legalerCardEffectiveTime" name="legalerCardEffectiveTime" class="form-control" type="hidden" th:value="${agent.legalerCardEffectiveTime}">
										</div>
                                    </div>
                                    <div class="form-group">
                                        <label>证件反面 *</label>
                                        <div>
	                                        <div class="layui-upload-drag" id="img_back" style="width: 70%;height: 200px;" >
	                                        	<img alt="" th:src="${agent.legalerCardPicBack}" id="img_b" width="100%" height="100%"/>
	                                        	<p>点击上传，或将文件拖拽到此处</p>
	                                        </div>
	                                        <input type="hidden" name="legalerCardPicBack" id="legalerCardPicBack" th:value="${agent.legalerCardPicBack}"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-12" style="margin-top: 18px;">
	                            	<legend>结算账户</legend>
	                            </div>
	                            <div class="col-sm-6">
                                    <div class="form-group">
                                        <label>账户类型 *</label>
                                        <select id="accountType" name="accountType" class="form-control" required="required">
											<option th:each="acctType:${acctTypes}" th:value="${acctType.key}" th:text="${acctType.value}" th:selected="${acctType.key eq agent.accountType}"></option>
										</select>
                                    </div>
                                    <div class="form-group">
                                        <label>开户银行 *</label>
                                        <select id="accountBankCode" name="accountBankCode" class="form-control" required="required">
											<option value="">请选择</option>
											<option th:each="bc:${bankCodes}" th:value="${bc.key}" th:text="${bc.value}" th:selected="${bc.key eq agent.accountBankCode}"></option>
										 </select>
										 <input type="hidden" name="accountBank" id="accountBank" th:value="${agent.accountBank}"/>
                                    </div>
                                    <div class="form-group">
                                        <label>开户人 *</label>
                                        <input id="accountOpenPerson" name="accountOpenPerson" class="form-control" type="text" required="required" th:value="${agent.accountOpenPerson}">
                                    </div>
                                    <div class="form-group">
                                        <label>开户人身份证号码 *</label>
                                        <input id="accountOpenCardNumber" name="accountOpenCardNumber" class="form-control" type="text" required="required" th:value="${agent.accountOpenCardNumber}">
                                    </div>
                                    <div class="form-group">
                                    	<label>卡/证影印件 *</label>
				                        <div>
	                                       <div class="layui-upload-drag" id="img_pic" style="width: 70%;height: 200px;" >
	                                       	<img alt="" th:src="${agent.accountPic}" id="img_p" width="100%" height="100%"/>
	                                       	<p>点击上传，或将文件拖拽到此处</p>
	                                       </div>
	                                       <input type="hidden" name="accountPic" id="accountPic" th:value="${agent.accountPic}"/>
	                                    </div>
                                    </div>
                                </div>
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label>开户城市 *</label>
                                        <div>
	                                        <select id="accountProvinceCode" name="accountProvinceCode" class="form-control required" required="required" style="width: 40%;float: left">
												<option value="">--省份--</option>
												<option th:each="pro:${provinces}" th:value="${pro.id}" th:text="${pro.name}" th:selected="${pro.id eq agent.accountProvinceCode}"></option>
											</select>
											<span style="vertical-align:top;padding: 8px;float: left">-</span>
											<input type="hidden" name="accountProvince" id="accountProvince" th:value="${agent.accountProvince}"/>
											<select id="accountCityCode" name="accountCityCode" class="form-control required" required="required" style="width: 40%">
												<option value="">--市--</option>
							 				</select>
							 				<input type="hidden" name="accountCity" id="accountCity" th:value="${agent.accountCity}"/>
						 				</div>
                                    </div>
                                    <div class="form-group">
                                        <label>支行 *</label>
                                        <select id="accountBankBranchCode" name="accountBankBranchCode" class="form-control">
						 				</select>
						 				<input type="hidden" name="accountBankBranch" id="accountBankBranch" th:value="${agent.accountBankBranch}"/>
                                    </div>
                                    <div class="form-group">
                                        <label>开户账号(结算账号) *</label>
                                        <input id="accountOpenNumber" name="accountOpenNumber" class="form-control" type="text" required="required" th:value="${agent.accountOpenNumber}">
                                    </div>
                                    <div class="form-group">
                                        <label>银行预留手机号 *</label>
                                        <input id="accountOpenPhone" name="accountOpenPhone" class="form-control" type="text" maxlength="11" required="required" th:value="${agent.accountOpenPhone}">
                                    </div>
                                </div>
                                <div class="col-sm-12" align="right">
                                	<button  type="submit" class="btn btn-success">保存</button>
                                </div>
                            </div>
                        </fieldset>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
	<div th:include="include::footer"></div>
	<script th:inline="javascript">
	/*<![CDATA[*/
	    var cityCode = [[${agent.cityCode}]];
	    var accountCityCode = [[${agent.accountCityCode}]];
	    var accountBankBranchCode = [[${agent.accountBankBranchCode}]];
	/*]]>*/
	</script>
	<script type="text/javascript" src="/js/plugins/layui/layui.js"></script>
	<script type="text/javascript" src="/js/bootstrap-datetimepicker.min.js"></script><!-- 日期框 -->
	<script type="text/javascript" src="/js/bootstrap-datetimepicker.zh-CN.js"></script><!-- 日期框 -->
	<script type="text/javascript" src="/js/jquery.selectBoxIt.min.js"></script>
	<script type="text/javascript" src="/js/appjs/pay/comm.js"></script>
	<script type="text/javascript" src="/js/md5.min.js"></script>
	<<script type="text/javascript" src="/js/appjs/pay/agent/realName.js">
	</script> 
	<script type="text/javascript">
	var isTwoCommit = false;
	$(document).ready(function () {
		loadFun();
    });
	</script>
</body>
</html>
